package v1

import (
	"source-admin-go/src/controllers/v1/User"
	User2 "source-admin-go/src/controllers/v2/User"

	"github.com/gin-gonic/gin"
)

type BaseController struct {
}

var routeModuleName = "user"

func RegisterRoute(router *gin.RouterGroup) {
	// 注册
	registerRestfulApiV1(router)
	registerRestfulApiV2(router)
}

func registerRestfulApiV1(router *gin.RouterGroup) {
	router = router.Group("/v1/" + routeModuleName)
	router.POST("/get/users", User.GetUsers())
}

func registerRestfulApiV2(router *gin.RouterGroup) {
	router = router.Group("/v2/" + routeModuleName)
	router.POST("/get/users", User2.GetUsers())
}
